package Q5;

public class Employee {
	private String firstName;
	private String lastName;
	private double salary = 0; // monthly salary

	public Employee(String firstName, String lastName, double salary) {
		setFirstName(firstName);
		setLastName(lastName);
		setSalary(salary);
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public void setSalary(double salary) {
		// if salary is not positive, do not set it.
		if (salary > 10e-7) {
			this.salary = salary;
		}
	}

	public String getFirstName() {
		return this.firstName;
	}

	public String getLastName() {
		return this.lastName;
	}

	public double getSalary() {
		return this.salary;
	}
}
